<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>local::lib - create and use a local lib/ for perl modules with PERL5LIB - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of local-lib - MetaCPAN" href="https://metacpan.org/dist/local-lib/releases.rss" />
        <link rel="canonical" href="./local::lib.html" />
        <meta name="description" content="create and use a local lib/ for perl modules with PERL5LIB" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/local::lib" />
<meta name="twitter:title"       content="local::lib" />
<meta name="twitter:description" content="create and use a local lib/ for perl modules with PERL5LIB" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./local::lib.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of local-lib was released.">
      <span class="relatize">20 Apr 2022 13:42:16 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/local-lib">local-lib</a>
  </li>
  <li>
    Module version: 2.000029
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/local-lib/source/lib/local/lib.pm">Source</a>
    (<a href="https://metacpan.org/dist/local-lib/source/lib/local/lib.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/local-lib/source/lib/local">Browse</a>
    (<a href="https://metacpan.org/dist/local-lib/source/lib/local?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/local-lib/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/local-lib/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/Perl-Toolchain-Gang/local-lib">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=local-lib">Issues</a>
      (5)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=local-lib+2.000029" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/l/local-lib.html?oncpan=1&amp;distmat=1&amp;version=2.000029&amp;grade=2" style="color: #090">3335</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/l/local-lib.html?oncpan=1&amp;distmat=1&amp;version=2.000029&amp;grade=3" style="color: #900">5</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/l/local-lib.html?oncpan=1&amp;distmat=1&amp;version=2.000029&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/HAARG/local-lib-2.000029">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on local-lib who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 9
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/local-lib-2.000029/index.html">55.08% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.6.0
    </li>
    <li class="chat-banner">
      <div><a rel="noopener nofollow" target="_blank" href="https://kiwiirc.com/nextclient/#irc://irc.perl.org/#local-lib?nick=mc-guest-?">Chat with us!</a></div>
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/local-lib/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000029.tar.gz">
      Download (<span itemprop="fileSize">62.29KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FHAARG%2Flocal-lib-2.000029%2Flib%2Flocal%2Flib.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/local-lib/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/local-lib/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:local-lib">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="local-lib">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/local/lib.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="HAARG/local-lib-2.000029"
>2.000029
  (HAARG on 2022-04-20)</option>
<option
  
  value="HAARG/local-lib-2.000028"
>2.000028
  (HAARG on 2021-10-17)</option>
<option
  
  value="HAARG/local-lib-2.000027"
>2.000027
  (HAARG on 2021-10-14)</option>
<option
  
  value="HAARG/local-lib-2.000_026"
>2.000_026 DEV
  (HAARG on 2021-10-11)</option>
<option
  
  value="HAARG/local-lib-2.000_025"
>2.000_025 DEV
  (HAARG on 2020-07-30)</option>
<option
  
  value="HAARG/local-lib-2.000024"
>2.000024
  (HAARG on 2017-10-08)</option>
<option
  
  value="HAARG/local-lib-2.000023"
>2.000023
  (HAARG on 2017-06-07)</option>
<option
  
  value="HAARG/local-lib-2.000022"
>2.000022
  (HAARG on 2017-06-07)</option>
<option
  
  value="HAARG/local-lib-2.000_021"
>2.000_021 DEV
  (HAARG on 2017-04-23)</option>
<option
  
  value="HAARG/local-lib-2.000_020"
>2.000_020 DEV
  (HAARG on 2016-10-18)</option>
<option
  
  value="HAARG/local-lib-2.000019"
>2.000019
  (HAARG on 2016-04-19)</option>
<option
  
  value="HAARG/local-lib-2.000018"
>2.000018
  (HAARG on 2015-10-29)</option>
<option
  
  value="HAARG/local-lib-2.000017"
>2.000017
  (HAARG on 2015-10-06)</option>
<option
  
  value="HAARG/local-lib-2.000_016"
>2.000_016 DEV
  (HAARG on 2015-09-02)</option>
<option
  
  value="HAARG/local-lib-2.000015"
>2.000015
  (HAARG on 2014-12-12)</option>
<option
  
  value="HAARG/local-lib-2.000014"
>2.000014
  (HAARG on 2014-09-04)</option>
<option
  
  value="HAARG/local-lib-2.000013"
>2.000013
  (HAARG on 2014-08-16)</option>
<option
  
  value="HAARG/local-lib-2.000012"
>2.000012
  (HAARG on 2014-05-12)</option>
<option
  
  value="ETHER/local-lib-2.000011"
>2.000011
  (ETHER on 2014-04-02)</option>
<option
  
  value="HAARG/local-lib-2.000010"
>2.000010
  (HAARG on 2014-03-28)</option>
<option
  
  value="HAARG/local-lib-2.000_009"
>2.000_009 DEV
  (HAARG on 2014-03-15)</option>
<option
  
  value="HAARG/local-lib-2.000008"
>2.000008
  (HAARG on 2014-03-13)</option>
<option
  
  value="HAARG/local-lib-2.000007"
>2.000007
  (HAARG on 2014-03-11)</option>
<option
  
  value="HAARG/local-lib-2.000006"
>2.000006
  (HAARG on 2014-03-07)</option>
<option
  
  value="HAARG/local-lib-2.000_005"
>2.000_005 DEV
  (HAARG on 2014-03-06)</option>
<option
  
  value="HAARG/local-lib-2.000004"
>2.000004
  (HAARG on 2014-01-03)</option>
<option
  
  value="HAARG/local-lib-2.000003"
>2.000003
  (HAARG on 2013-12-30)</option>
<option
  
  value="HAARG/local-lib-2.000_002"
>2.000_002 DEV
  (HAARG on 2013-12-25)</option>
<option
  
  value="HAARG/local-lib-2.000_001"
>2.000_001 DEV
  (HAARG on 2013-12-23)</option>
<option
  
  value="HAARG/local-lib-2.000_000"
>2.000_000 DEV
  (HAARG on 2013-12-23)</option>
<option
  
  value="HAARG/local-lib-1.008026"
>1.008026
  (HAARG on 2013-11-06)</option>
<option
  
  value="APEIRON/local-lib-1.008009"
>1.008009
  (APEIRON on 2013-02-25)</option>
<option
  
  value="APEIRON/local-lib-1.008008"
>1.008008
  (APEIRON on 2013-02-24)</option>
<option
  
  value="MSTROUT/local-lib-1.008007"
>1.008007
  (MSTROUT on 2013-02-17)</option>
<option
  
  value="APEIRON/local-lib-1.008006"
>1.008006
  (APEIRON on 2013-02-12)</option>
<option
  
  value="APEIRON/local-lib-1.008005"
>1.008005
  (APEIRON on 2013-02-12)</option>
<option
  
  value="APEIRON/local-lib-1.008004"
>1.008004
  (APEIRON on 2011-02-24)</option>
<option
  
  value="APEIRON/local-lib-1.008003"
>1.008003
  (APEIRON on 2011-02-24)</option>
<option
  
  value="APEIRON/local-lib-1.008002"
>1.008002
  (APEIRON on 2011-02-23)</option>
<option
  
  value="APEIRON/local-lib-1.008001"
>1.008001
  (APEIRON on 2011-01-09)</option>
<option
  
  value="APEIRON/local-lib-1.008000"
>1.008000
  (APEIRON on 2011-01-05)</option>
<option
  
  value="APEIRON/local-lib-1.007000"
>1.007000
  (APEIRON on 2010-12-10)</option>
<option
  
  value="APEIRON/local-lib-1.006008"
>1.006008
  (APEIRON on 2010-11-17)</option>
<option
  
  value="MSTROUT/local-lib-1.006000"
>1.006000
  (MSTROUT on 2010-03-31)</option>
<option
  
  value="APEIRON/local-lib-1.005001"
>1.005001
  (APEIRON on 2010-03-10)</option>
<option
  
  value="APEIRON/local-lib-1.004009"
>1.004009
  (APEIRON on 2009-11-08)</option>
<option
  
  value="APEIRON/local-lib-1.004008"
>1.004008
  (APEIRON on 2009-10-14)</option>
<option
  
  value="APEIRON/local-lib-1.004007"
>1.004007
  (APEIRON on 2009-09-03)</option>
<option
  
  value="APEIRON/local-lib-1.004006"
>1.004006
  (APEIRON on 2009-08-26)</option>
<option
  
  value="APEIRON/local-lib-1.004005"
>1.004005
  (APEIRON on 2009-08-24)</option>
<option
  
  value="APEIRON/local-lib-1.004004"
>1.004004
  (APEIRON on 2009-08-06)</option>
<option
  
  value="APEIRON/local-lib-1.004003"
>1.004003
  (APEIRON on 2009-06-16)</option>
<option
  
  value="APEIRON/local-lib-1.004002"
>1.004002
  (APEIRON on 2009-06-15)</option>
<option
  
  value="APEIRON/local-lib-1.004001"
>1.004001
  (APEIRON on 2009-05-22)</option>
<option
  
  value="APEIRON/local-lib-1.004000"
>1.004000
  (APEIRON on 2009-05-15)</option>
<option
  
  value="APEIRON/local-lib-1.003004"
>1.003004
  (APEIRON on 2009-05-13)</option>
<option
  
  value="APEIRON/local-lib-1.003003"
>1.003003
  (APEIRON on 2009-04-10)</option>
<option
  
  value="APEIRON/local-lib-1.003002"
>1.003002
  (APEIRON on 2009-02-25)</option>
<option
  
  value="APEIRON/local-lib-1.003001"
>1.003001
  (APEIRON on 2009-01-14)</option>
<option
  
  value="APEIRON/local-lib-1.003000"
>1.003000
  (APEIRON on 2009-01-14)</option>
<option
  
  value="MSTROUT/local-lib-1.002000"
>1.002000
  (MSTROUT on 2008-08-21)</option>
<option
  
  value="APEIRON/local-lib-1.001000"
>1.001000
  (APEIRON on 2007-09-19)</option>
<optgroup label="BackPAN">'
<option
  
  value="HAARG/local-lib-1.008_025"
>1.008_025 DEV
  (HAARG on 2013-11-01)</option>
<option
  
  value="HAARG/local-lib-1.008_024"
>1.008_024 DEV
  (HAARG on 2013-10-28)</option>
<option
  
  value="ETHER/local-lib-1.008023"
>1.008023
  (ETHER on 2013-10-19)</option>
<option
  
  value="ETHER/local-lib-1.008_022"
>1.008_022 DEV
  (ETHER on 2013-10-07)</option>
<option
  
  value="ETHER/local-lib-1.008_021"
>1.008_021 DEV
  (ETHER on 2013-10-04)</option>
<option
  
  value="ETHER/local-lib-1.008_020"
>1.008_020 DEV
  (ETHER on 2013-10-03)</option>
<option
  
  value="ETHER/local-lib-1.008_019"
>1.008_019 DEV
  (ETHER on 2013-09-29)</option>
<option
  
  value="ETHER/local-lib-1.008018"
>1.008018
  (ETHER on 2013-09-15)</option>
<option
  
  value="ETHER/local-lib-1.008017"
>1.008017
  (ETHER on 2013-09-14)</option>
<option
  
  value="ETHER/local-lib-1.008016"
>1.008016
  (ETHER on 2013-09-13)</option>
<option
  
  value="ETHER/local-lib-1.008015"
>1.008015
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008014"
>1.008014
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008013"
>1.008013
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008012"
>1.008012
  (ETHER on 2013-09-11)</option>
<option
  
  value="ETHER/local-lib-1.008011"
>1.008011
  (ETHER on 2013-07-27)</option>
<option
  
  value="ETHER/local-lib-1.008010"
>1.008010
  (ETHER on 2013-05-27)</option>
<option
  
  value="ETHER/local-lib-1.008009"
>1.008009
  (ETHER on 2013-05-22)</option>
<option
  
  value="GETTY/local-lib-1.006009"
>1.006009
  (GETTY on 2010-12-09)</option>
<option
  
  value="GETTY/local-lib-1.006007"
>1.006007
  (GETTY on 2010-08-12)</option>
<option
  
  value="GETTY/local-lib-1.006006"
>1.006006
  (GETTY on 2010-08-12)</option>
<option
  
  value="GETTY/local-lib-1.006005"
>1.006005
  (GETTY on 2010-07-13)</option>
<option
  
  value="GETTY/local-lib-1.006004"
>1.006004
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006003"
>1.006003
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006002"
>1.006002
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006001"
>1.006001
  (GETTY on 2010-06-10)</option>
<option
  
  value="APEIRON/local-lib-1.005000"
>1.005000
  (APEIRON on 2010-03-10)</option>
<option
  
  value="MSTROUT/local-lib-1.000000"
>1.000000
  (MSTROUT on 2007-09-13)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/HAARG/local-lib-2.000029/diff/' + encodeURIComponent(this.value) + '/lib/local/lib.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="HAARG/local-lib-2.000029"
>2.000029
  (HAARG on 2022-04-20)</option>
<option
  
  value="HAARG/local-lib-2.000028"
>2.000028
  (HAARG on 2021-10-17)</option>
<option
  
  value="HAARG/local-lib-2.000027"
>2.000027
  (HAARG on 2021-10-14)</option>
<option
  
  value="HAARG/local-lib-2.000_026"
>2.000_026 DEV
  (HAARG on 2021-10-11)</option>
<option
  
  value="HAARG/local-lib-2.000_025"
>2.000_025 DEV
  (HAARG on 2020-07-30)</option>
<option
  
  value="HAARG/local-lib-2.000024"
>2.000024
  (HAARG on 2017-10-08)</option>
<option
  
  value="HAARG/local-lib-2.000023"
>2.000023
  (HAARG on 2017-06-07)</option>
<option
  
  value="HAARG/local-lib-2.000022"
>2.000022
  (HAARG on 2017-06-07)</option>
<option
  
  value="HAARG/local-lib-2.000_021"
>2.000_021 DEV
  (HAARG on 2017-04-23)</option>
<option
  
  value="HAARG/local-lib-2.000_020"
>2.000_020 DEV
  (HAARG on 2016-10-18)</option>
<option
  
  value="HAARG/local-lib-2.000019"
>2.000019
  (HAARG on 2016-04-19)</option>
<option
  
  value="HAARG/local-lib-2.000018"
>2.000018
  (HAARG on 2015-10-29)</option>
<option
  
  value="HAARG/local-lib-2.000017"
>2.000017
  (HAARG on 2015-10-06)</option>
<option
  
  value="HAARG/local-lib-2.000_016"
>2.000_016 DEV
  (HAARG on 2015-09-02)</option>
<option
  
  value="HAARG/local-lib-2.000015"
>2.000015
  (HAARG on 2014-12-12)</option>
<option
  
  value="HAARG/local-lib-2.000014"
>2.000014
  (HAARG on 2014-09-04)</option>
<option
  
  value="HAARG/local-lib-2.000013"
>2.000013
  (HAARG on 2014-08-16)</option>
<option
  
  value="HAARG/local-lib-2.000012"
>2.000012
  (HAARG on 2014-05-12)</option>
<option
  
  value="ETHER/local-lib-2.000011"
>2.000011
  (ETHER on 2014-04-02)</option>
<option
  
  value="HAARG/local-lib-2.000010"
>2.000010
  (HAARG on 2014-03-28)</option>
<option
  
  value="HAARG/local-lib-2.000_009"
>2.000_009 DEV
  (HAARG on 2014-03-15)</option>
<option
  
  value="HAARG/local-lib-2.000008"
>2.000008
  (HAARG on 2014-03-13)</option>
<option
  
  value="HAARG/local-lib-2.000007"
>2.000007
  (HAARG on 2014-03-11)</option>
<option
  
  value="HAARG/local-lib-2.000006"
>2.000006
  (HAARG on 2014-03-07)</option>
<option
  
  value="HAARG/local-lib-2.000_005"
>2.000_005 DEV
  (HAARG on 2014-03-06)</option>
<option
  
  value="HAARG/local-lib-2.000004"
>2.000004
  (HAARG on 2014-01-03)</option>
<option
  
  value="HAARG/local-lib-2.000003"
>2.000003
  (HAARG on 2013-12-30)</option>
<option
  
  value="HAARG/local-lib-2.000_002"
>2.000_002 DEV
  (HAARG on 2013-12-25)</option>
<option
  
  value="HAARG/local-lib-2.000_001"
>2.000_001 DEV
  (HAARG on 2013-12-23)</option>
<option
  
  value="HAARG/local-lib-2.000_000"
>2.000_000 DEV
  (HAARG on 2013-12-23)</option>
<option
  
  value="HAARG/local-lib-1.008026"
>1.008026
  (HAARG on 2013-11-06)</option>
<option
  
  value="APEIRON/local-lib-1.008009"
>1.008009
  (APEIRON on 2013-02-25)</option>
<option
  
  value="APEIRON/local-lib-1.008008"
>1.008008
  (APEIRON on 2013-02-24)</option>
<option
  
  value="MSTROUT/local-lib-1.008007"
>1.008007
  (MSTROUT on 2013-02-17)</option>
<option
  
  value="APEIRON/local-lib-1.008006"
>1.008006
  (APEIRON on 2013-02-12)</option>
<option
  
  value="APEIRON/local-lib-1.008005"
>1.008005
  (APEIRON on 2013-02-12)</option>
<option
  
  value="APEIRON/local-lib-1.008004"
>1.008004
  (APEIRON on 2011-02-24)</option>
<option
  
  value="APEIRON/local-lib-1.008003"
>1.008003
  (APEIRON on 2011-02-24)</option>
<option
  
  value="APEIRON/local-lib-1.008002"
>1.008002
  (APEIRON on 2011-02-23)</option>
<option
  
  value="APEIRON/local-lib-1.008001"
>1.008001
  (APEIRON on 2011-01-09)</option>
<option
  
  value="APEIRON/local-lib-1.008000"
>1.008000
  (APEIRON on 2011-01-05)</option>
<option
  
  value="APEIRON/local-lib-1.007000"
>1.007000
  (APEIRON on 2010-12-10)</option>
<option
  
  value="APEIRON/local-lib-1.006008"
>1.006008
  (APEIRON on 2010-11-17)</option>
<option
  
  value="MSTROUT/local-lib-1.006000"
>1.006000
  (MSTROUT on 2010-03-31)</option>
<option
  
  value="APEIRON/local-lib-1.005001"
>1.005001
  (APEIRON on 2010-03-10)</option>
<option
  
  value="APEIRON/local-lib-1.004009"
>1.004009
  (APEIRON on 2009-11-08)</option>
<option
  
  value="APEIRON/local-lib-1.004008"
>1.004008
  (APEIRON on 2009-10-14)</option>
<option
  
  value="APEIRON/local-lib-1.004007"
>1.004007
  (APEIRON on 2009-09-03)</option>
<option
  
  value="APEIRON/local-lib-1.004006"
>1.004006
  (APEIRON on 2009-08-26)</option>
<option
  
  value="APEIRON/local-lib-1.004005"
>1.004005
  (APEIRON on 2009-08-24)</option>
<option
  
  value="APEIRON/local-lib-1.004004"
>1.004004
  (APEIRON on 2009-08-06)</option>
<option
  
  value="APEIRON/local-lib-1.004003"
>1.004003
  (APEIRON on 2009-06-16)</option>
<option
  
  value="APEIRON/local-lib-1.004002"
>1.004002
  (APEIRON on 2009-06-15)</option>
<option
  
  value="APEIRON/local-lib-1.004001"
>1.004001
  (APEIRON on 2009-05-22)</option>
<option
  
  value="APEIRON/local-lib-1.004000"
>1.004000
  (APEIRON on 2009-05-15)</option>
<option
  
  value="APEIRON/local-lib-1.003004"
>1.003004
  (APEIRON on 2009-05-13)</option>
<option
  
  value="APEIRON/local-lib-1.003003"
>1.003003
  (APEIRON on 2009-04-10)</option>
<option
  
  value="APEIRON/local-lib-1.003002"
>1.003002
  (APEIRON on 2009-02-25)</option>
<option
  
  value="APEIRON/local-lib-1.003001"
>1.003001
  (APEIRON on 2009-01-14)</option>
<option
  
  value="APEIRON/local-lib-1.003000"
>1.003000
  (APEIRON on 2009-01-14)</option>
<option
  
  value="MSTROUT/local-lib-1.002000"
>1.002000
  (MSTROUT on 2008-08-21)</option>
<option
  
  value="APEIRON/local-lib-1.001000"
>1.001000
  (APEIRON on 2007-09-19)</option>
<optgroup label="BackPAN">'
<option
  
  value="HAARG/local-lib-1.008_025"
>1.008_025 DEV
  (HAARG on 2013-11-01)</option>
<option
  
  value="HAARG/local-lib-1.008_024"
>1.008_024 DEV
  (HAARG on 2013-10-28)</option>
<option
  
  value="ETHER/local-lib-1.008023"
>1.008023
  (ETHER on 2013-10-19)</option>
<option
  
  value="ETHER/local-lib-1.008_022"
>1.008_022 DEV
  (ETHER on 2013-10-07)</option>
<option
  
  value="ETHER/local-lib-1.008_021"
>1.008_021 DEV
  (ETHER on 2013-10-04)</option>
<option
  
  value="ETHER/local-lib-1.008_020"
>1.008_020 DEV
  (ETHER on 2013-10-03)</option>
<option
  
  value="ETHER/local-lib-1.008_019"
>1.008_019 DEV
  (ETHER on 2013-09-29)</option>
<option
  
  value="ETHER/local-lib-1.008018"
>1.008018
  (ETHER on 2013-09-15)</option>
<option
  
  value="ETHER/local-lib-1.008017"
>1.008017
  (ETHER on 2013-09-14)</option>
<option
  
  value="ETHER/local-lib-1.008016"
>1.008016
  (ETHER on 2013-09-13)</option>
<option
  
  value="ETHER/local-lib-1.008015"
>1.008015
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008014"
>1.008014
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008013"
>1.008013
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008012"
>1.008012
  (ETHER on 2013-09-11)</option>
<option
  
  value="ETHER/local-lib-1.008011"
>1.008011
  (ETHER on 2013-07-27)</option>
<option
  
  value="ETHER/local-lib-1.008010"
>1.008010
  (ETHER on 2013-05-27)</option>
<option
  
  value="ETHER/local-lib-1.008009"
>1.008009
  (ETHER on 2013-05-22)</option>
<option
  
  value="GETTY/local-lib-1.006009"
>1.006009
  (GETTY on 2010-12-09)</option>
<option
  
  value="GETTY/local-lib-1.006007"
>1.006007
  (GETTY on 2010-08-12)</option>
<option
  
  value="GETTY/local-lib-1.006006"
>1.006006
  (GETTY on 2010-08-12)</option>
<option
  
  value="GETTY/local-lib-1.006005"
>1.006005
  (GETTY on 2010-07-13)</option>
<option
  
  value="GETTY/local-lib-1.006004"
>1.006004
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006003"
>1.006003
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006002"
>1.006002
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006001"
>1.006001
  (GETTY on 2010-06-10)</option>
<option
  
  value="APEIRON/local-lib-1.005000"
>1.005000
  (APEIRON on 2010-03-10)</option>
<option
  
  value="MSTROUT/local-lib-1.000000"
>1.000000
  (MSTROUT on 2007-09-13)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/CPAN" title="CPAN" class="ellipsis">CPAN</a></li>
  <li><a href="https://metacpan.org/pod/ExtUtils::Install" title="ExtUtils::Install" class="ellipsis">ExtUtils::Install</a></li>
  <li><a href="https://metacpan.org/pod/ExtUtils::MakeMaker" title="ExtUtils::MakeMaker" class="ellipsis">ExtUtils::MakeMaker</a></li>
  <li><a href="./Module::Build.html" title="Module::Build" class="ellipsis">Module::Build</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/local::lib/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=local%3A%3Alib">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=local-lib">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/HAARG/local-lib-2.000029/view/lib/local/lib.pm">This version</a>
    </li>
    <li>
      <a href="./local::lib.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/DOUGDUDE"><img src="https://www.gravatar.com/avatar/55ec7e7ef06ffa35decf218a2ca6485a?d=identicon&amp;s=20" title="DOUGDUDE" alt="DOUGDUDE"></a>
<a class="display-all" href="https://metacpan.org/author/JONASBN"><img src="https://www.gravatar.com/avatar/1b053b414cecd279ef44423c75b3d227?d=identicon&amp;s=20" title="JONASBN" alt="JONASBN"></a>
<a class="display-all" href="https://metacpan.org/author/MARSENI"><img src="https://www.gravatar.com/avatar/9b0819943a0746dac5a17a5781759a7a?d=identicon&amp;s=20" title="MARSENI" alt="MARSENI"></a>
<a class="display-all" href="https://metacpan.org/author/DEMIAN"><img src="https://www.gravatar.com/avatar/4eead33e026cb118da76f3bc2e0e723f?d=identicon&amp;s=20" title="DEMIAN" alt="DEMIAN"></a>
<a class="display-all" href="https://metacpan.org/author/KOORCHIK"><img src="https://www.gravatar.com/avatar/388f0564e6cb0de0996b4f0d3c50e9f8?d=identicon&amp;s=20" title="KOORCHIK" alt="KOORCHIK"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/local-lib/plussers">54 PAUSE users</a>
</div>
<div>
    38 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-contrib-email="mst@shadowcat.co.uk"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      mst - Matt S. Trout (cpan:MSTROUT)
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/HAARG" class="author-name">Graham Knop</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/local/lib.pm&#39;" class="">
<option
  selected
  value="HAARG/local-lib-2.000029"
>2.000029
  (HAARG on 2022-04-20)</option>
<option
  
  value="HAARG/local-lib-2.000028"
>2.000028
  (HAARG on 2021-10-17)</option>
<option
  
  value="HAARG/local-lib-2.000027"
>2.000027
  (HAARG on 2021-10-14)</option>
<option
  
  value="HAARG/local-lib-2.000_026"
>2.000_026 DEV
  (HAARG on 2021-10-11)</option>
<option
  
  value="HAARG/local-lib-2.000_025"
>2.000_025 DEV
  (HAARG on 2020-07-30)</option>
<option
  
  value="HAARG/local-lib-2.000024"
>2.000024
  (HAARG on 2017-10-08)</option>
<option
  
  value="HAARG/local-lib-2.000023"
>2.000023
  (HAARG on 2017-06-07)</option>
<option
  
  value="HAARG/local-lib-2.000022"
>2.000022
  (HAARG on 2017-06-07)</option>
<option
  
  value="HAARG/local-lib-2.000_021"
>2.000_021 DEV
  (HAARG on 2017-04-23)</option>
<option
  
  value="HAARG/local-lib-2.000_020"
>2.000_020 DEV
  (HAARG on 2016-10-18)</option>
<option
  
  value="HAARG/local-lib-2.000019"
>2.000019
  (HAARG on 2016-04-19)</option>
<option
  
  value="HAARG/local-lib-2.000018"
>2.000018
  (HAARG on 2015-10-29)</option>
<option
  
  value="HAARG/local-lib-2.000017"
>2.000017
  (HAARG on 2015-10-06)</option>
<option
  
  value="HAARG/local-lib-2.000_016"
>2.000_016 DEV
  (HAARG on 2015-09-02)</option>
<option
  
  value="HAARG/local-lib-2.000015"
>2.000015
  (HAARG on 2014-12-12)</option>
<option
  
  value="HAARG/local-lib-2.000014"
>2.000014
  (HAARG on 2014-09-04)</option>
<option
  
  value="HAARG/local-lib-2.000013"
>2.000013
  (HAARG on 2014-08-16)</option>
<option
  
  value="HAARG/local-lib-2.000012"
>2.000012
  (HAARG on 2014-05-12)</option>
<option
  
  value="ETHER/local-lib-2.000011"
>2.000011
  (ETHER on 2014-04-02)</option>
<option
  
  value="HAARG/local-lib-2.000010"
>2.000010
  (HAARG on 2014-03-28)</option>
<option
  
  value="HAARG/local-lib-2.000_009"
>2.000_009 DEV
  (HAARG on 2014-03-15)</option>
<option
  
  value="HAARG/local-lib-2.000008"
>2.000008
  (HAARG on 2014-03-13)</option>
<option
  
  value="HAARG/local-lib-2.000007"
>2.000007
  (HAARG on 2014-03-11)</option>
<option
  
  value="HAARG/local-lib-2.000006"
>2.000006
  (HAARG on 2014-03-07)</option>
<option
  
  value="HAARG/local-lib-2.000_005"
>2.000_005 DEV
  (HAARG on 2014-03-06)</option>
<option
  
  value="HAARG/local-lib-2.000004"
>2.000004
  (HAARG on 2014-01-03)</option>
<option
  
  value="HAARG/local-lib-2.000003"
>2.000003
  (HAARG on 2013-12-30)</option>
<option
  
  value="HAARG/local-lib-2.000_002"
>2.000_002 DEV
  (HAARG on 2013-12-25)</option>
<option
  
  value="HAARG/local-lib-2.000_001"
>2.000_001 DEV
  (HAARG on 2013-12-23)</option>
<option
  
  value="HAARG/local-lib-2.000_000"
>2.000_000 DEV
  (HAARG on 2013-12-23)</option>
<option
  
  value="HAARG/local-lib-1.008026"
>1.008026
  (HAARG on 2013-11-06)</option>
<option
  
  value="APEIRON/local-lib-1.008009"
>1.008009
  (APEIRON on 2013-02-25)</option>
<option
  
  value="APEIRON/local-lib-1.008008"
>1.008008
  (APEIRON on 2013-02-24)</option>
<option
  
  value="MSTROUT/local-lib-1.008007"
>1.008007
  (MSTROUT on 2013-02-17)</option>
<option
  
  value="APEIRON/local-lib-1.008006"
>1.008006
  (APEIRON on 2013-02-12)</option>
<option
  
  value="APEIRON/local-lib-1.008005"
>1.008005
  (APEIRON on 2013-02-12)</option>
<option
  
  value="APEIRON/local-lib-1.008004"
>1.008004
  (APEIRON on 2011-02-24)</option>
<option
  
  value="APEIRON/local-lib-1.008003"
>1.008003
  (APEIRON on 2011-02-24)</option>
<option
  
  value="APEIRON/local-lib-1.008002"
>1.008002
  (APEIRON on 2011-02-23)</option>
<option
  
  value="APEIRON/local-lib-1.008001"
>1.008001
  (APEIRON on 2011-01-09)</option>
<option
  
  value="APEIRON/local-lib-1.008000"
>1.008000
  (APEIRON on 2011-01-05)</option>
<option
  
  value="APEIRON/local-lib-1.007000"
>1.007000
  (APEIRON on 2010-12-10)</option>
<option
  
  value="APEIRON/local-lib-1.006008"
>1.006008
  (APEIRON on 2010-11-17)</option>
<option
  
  value="MSTROUT/local-lib-1.006000"
>1.006000
  (MSTROUT on 2010-03-31)</option>
<option
  
  value="APEIRON/local-lib-1.005001"
>1.005001
  (APEIRON on 2010-03-10)</option>
<option
  
  value="APEIRON/local-lib-1.004009"
>1.004009
  (APEIRON on 2009-11-08)</option>
<option
  
  value="APEIRON/local-lib-1.004008"
>1.004008
  (APEIRON on 2009-10-14)</option>
<option
  
  value="APEIRON/local-lib-1.004007"
>1.004007
  (APEIRON on 2009-09-03)</option>
<option
  
  value="APEIRON/local-lib-1.004006"
>1.004006
  (APEIRON on 2009-08-26)</option>
<option
  
  value="APEIRON/local-lib-1.004005"
>1.004005
  (APEIRON on 2009-08-24)</option>
<option
  
  value="APEIRON/local-lib-1.004004"
>1.004004
  (APEIRON on 2009-08-06)</option>
<option
  
  value="APEIRON/local-lib-1.004003"
>1.004003
  (APEIRON on 2009-06-16)</option>
<option
  
  value="APEIRON/local-lib-1.004002"
>1.004002
  (APEIRON on 2009-06-15)</option>
<option
  
  value="APEIRON/local-lib-1.004001"
>1.004001
  (APEIRON on 2009-05-22)</option>
<option
  
  value="APEIRON/local-lib-1.004000"
>1.004000
  (APEIRON on 2009-05-15)</option>
<option
  
  value="APEIRON/local-lib-1.003004"
>1.003004
  (APEIRON on 2009-05-13)</option>
<option
  
  value="APEIRON/local-lib-1.003003"
>1.003003
  (APEIRON on 2009-04-10)</option>
<option
  
  value="APEIRON/local-lib-1.003002"
>1.003002
  (APEIRON on 2009-02-25)</option>
<option
  
  value="APEIRON/local-lib-1.003001"
>1.003001
  (APEIRON on 2009-01-14)</option>
<option
  
  value="APEIRON/local-lib-1.003000"
>1.003000
  (APEIRON on 2009-01-14)</option>
<option
  
  value="MSTROUT/local-lib-1.002000"
>1.002000
  (MSTROUT on 2008-08-21)</option>
<option
  
  value="APEIRON/local-lib-1.001000"
>1.001000
  (APEIRON on 2007-09-19)</option>
<optgroup label="BackPAN">'
<option
  
  value="HAARG/local-lib-1.008_025"
>1.008_025 DEV
  (HAARG on 2013-11-01)</option>
<option
  
  value="HAARG/local-lib-1.008_024"
>1.008_024 DEV
  (HAARG on 2013-10-28)</option>
<option
  
  value="ETHER/local-lib-1.008023"
>1.008023
  (ETHER on 2013-10-19)</option>
<option
  
  value="ETHER/local-lib-1.008_022"
>1.008_022 DEV
  (ETHER on 2013-10-07)</option>
<option
  
  value="ETHER/local-lib-1.008_021"
>1.008_021 DEV
  (ETHER on 2013-10-04)</option>
<option
  
  value="ETHER/local-lib-1.008_020"
>1.008_020 DEV
  (ETHER on 2013-10-03)</option>
<option
  
  value="ETHER/local-lib-1.008_019"
>1.008_019 DEV
  (ETHER on 2013-09-29)</option>
<option
  
  value="ETHER/local-lib-1.008018"
>1.008018
  (ETHER on 2013-09-15)</option>
<option
  
  value="ETHER/local-lib-1.008017"
>1.008017
  (ETHER on 2013-09-14)</option>
<option
  
  value="ETHER/local-lib-1.008016"
>1.008016
  (ETHER on 2013-09-13)</option>
<option
  
  value="ETHER/local-lib-1.008015"
>1.008015
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008014"
>1.008014
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008013"
>1.008013
  (ETHER on 2013-09-12)</option>
<option
  
  value="ETHER/local-lib-1.008012"
>1.008012
  (ETHER on 2013-09-11)</option>
<option
  
  value="ETHER/local-lib-1.008011"
>1.008011
  (ETHER on 2013-07-27)</option>
<option
  
  value="ETHER/local-lib-1.008010"
>1.008010
  (ETHER on 2013-05-27)</option>
<option
  
  value="ETHER/local-lib-1.008009"
>1.008009
  (ETHER on 2013-05-22)</option>
<option
  
  value="GETTY/local-lib-1.006009"
>1.006009
  (GETTY on 2010-12-09)</option>
<option
  
  value="GETTY/local-lib-1.006007"
>1.006007
  (GETTY on 2010-08-12)</option>
<option
  
  value="GETTY/local-lib-1.006006"
>1.006006
  (GETTY on 2010-08-12)</option>
<option
  
  value="GETTY/local-lib-1.006005"
>1.006005
  (GETTY on 2010-07-13)</option>
<option
  
  value="GETTY/local-lib-1.006004"
>1.006004
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006003"
>1.006003
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006002"
>1.006002
  (GETTY on 2010-06-10)</option>
<option
  
  value="GETTY/local-lib-1.006001"
>1.006001
  (GETTY on 2010-06-10)</option>
<option
  
  value="APEIRON/local-lib-1.005000"
>1.005000
  (APEIRON on 2010-03-10)</option>
<option
  
  value="MSTROUT/local-lib-1.000000"
>1.000000
  (MSTROUT on 2007-09-13)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/local-lib">local-lib-2.000029</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage two &#10;
          • 34 direct dependents &#10;          • 85 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="local-lib-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="local-lib-2.000029">
    <input type="hidden" name="author" value="HAARG">
    <input type="hidden" name="distribution" value="local-lib">
    <button type="submit" class="favorite highlight"><span>92</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./local::lib.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>92</span> ++</a>
</div>
   / <span>local::lib</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./local::lib.html#NAME">NAME</a></li>
  <li><a href="./local::lib.html#SYNOPSIS">SYNOPSIS</a>
    <ul>
      <li><a href="./local::lib.html#The-bootstrapping-technique">The bootstrapping technique</a>
        <ul>
          <li><a href="./local::lib.html#Bootstrapping-into-an-alternate-directory">Bootstrapping into an alternate directory</a></li>
          <li><a href="./local::lib.html#Other-bootstrapping-options">Other bootstrapping options</a></li>
        </ul>
      </li>
      <li><a href="./local::lib.html#Differences-when-using-this-module-under-Win32">Differences when using this module under Win32</a>
        <ul>
          <li><a href="./local::lib.html#PowerShell">PowerShell</a></li>
        </ul>
      </li>
    </ul>
  </li>
  <li><a href="./local::lib.html#RATIONALE">RATIONALE</a></li>
  <li><a href="./local::lib.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./local::lib.html#CREATING-A-SELF-CONTAINED-SET-OF-MODULES">CREATING A SELF-CONTAINED SET OF MODULES</a></li>
  <li><a href="./local::lib.html#IMPORT-OPTIONS">IMPORT OPTIONS</a>
    <ul>
      <li><a href="./local::lib.html#-deactivate">--deactivate</a></li>
      <li><a href="./local::lib.html#-deactivate-all">--deactivate-all</a></li>
      <li><a href="./local::lib.html#-quiet">--quiet</a></li>
      <li><a href="./local::lib.html#-always">--always</a></li>
      <li><a href="./local::lib.html#-shelltype">--shelltype</a></li>
      <li><a href="./local::lib.html#-no-create">--no-create</a></li>
    </ul>
  </li>
  <li><a href="./local::lib.html#CLASS-METHODS">CLASS METHODS</a>
    <ul>
      <li><a href="./local::lib.html#ensure_dir_structure_for">ensure_dir_structure_for</a></li>
      <li><a href="./local::lib.html#print_environment_vars_for">print_environment_vars_for</a></li>
      <li><a href="./local::lib.html#build_environment_vars_for">build_environment_vars_for</a></li>
      <li><a href="./local::lib.html#setup_env_hash_for">setup_env_hash_for</a></li>
      <li><a href="./local::lib.html#active_paths">active_paths</a></li>
      <li><a href="./local::lib.html#install_base_perl_path">install_base_perl_path</a></li>
      <li><a href="./local::lib.html#lib_paths_for">lib_paths_for</a></li>
      <li><a href="./local::lib.html#install_base_bin_path">install_base_bin_path</a></li>
      <li><a href="./local::lib.html#installer_options_for">installer_options_for</a></li>
      <li><a href="./local::lib.html#resolve_empty_path">resolve_empty_path</a></li>
      <li><a href="./local::lib.html#resolve_home_path">resolve_home_path</a></li>
      <li><a href="./local::lib.html#resolve_relative_path">resolve_relative_path</a></li>
      <li><a href="./local::lib.html#resolve_path">resolve_path</a></li>
    </ul>
  </li>
  <li><a href="./local::lib.html#OBJECT-INTERFACE">OBJECT INTERFACE</a>
    <ul>
      <li><a href="./local::lib.html#new">new</a></li>
    </ul>
  </li>
  <li><a href="./local::lib.html#ATTRIBUTES">ATTRIBUTES</a>
    <ul>
      <li><a href="./local::lib.html#roots">roots</a></li>
      <li><a href="./local::lib.html#inc">inc</a></li>
      <li><a href="./local::lib.html#libs">libs</a></li>
      <li><a href="./local::lib.html#bins">bins</a></li>
      <li><a href="./local::lib.html#extra">extra</a></li>
      <li><a href="./local::lib.html#no_create">no_create</a></li>
    </ul>
  </li>
  <li><a href="./local::lib.html#OBJECT-METHODS">OBJECT METHODS</a>
    <ul>
      <li><a href="./local::lib.html#clone">clone</a></li>
      <li><a href="./local::lib.html#activate">activate</a></li>
      <li><a href="./local::lib.html#deactivate1">deactivate</a></li>
      <li><a href="./local::lib.html#deactivate_all">deactivate_all</a></li>
      <li><a href="./local::lib.html#environment_vars_string">environment_vars_string</a></li>
      <li><a href="./local::lib.html#build_environment_vars">build_environment_vars</a></li>
      <li><a href="./local::lib.html#setup_env_hash">setup_env_hash</a></li>
      <li><a href="./local::lib.html#setup_local_lib">setup_local_lib</a></li>
    </ul>
  </li>
  <li><a href="./local::lib.html#A-WARNING-ABOUT-UNINST=1">A WARNING ABOUT UNINST=1</a></li>
  <li><a href="./local::lib.html#LIMITATIONS">LIMITATIONS</a></li>
  <li><a href="./local::lib.html#TROUBLESHOOTING">TROUBLESHOOTING</a></li>
  <li><a href="./local::lib.html#ENVIRONMENT">ENVIRONMENT</a></li>
  <li><a href="./local::lib.html#SEE-ALSO">SEE ALSO</a></li>
  <li><a href="./local::lib.html#SUPPORT">SUPPORT</a></li>
  <li><a href="./local::lib.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./local::lib.html#CONTRIBUTORS">CONTRIBUTORS</a></li>
  <li><a href="./local::lib.html#COPYRIGHT">COPYRIGHT</a></li>
  <li><a href="./local::lib.html#LICENSE">LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>local::lib - create and use a local lib/ for perl modules with PERL5LIB</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<p>In code -</p>

<pre><code>  use local::lib; # sets up a local lib at ~/perl5

  use local::lib &#39;~/foo&#39;; # same, but ~/foo

  # Or...
  use FindBin;
  use local::lib &quot;$FindBin::Bin/../support&quot;;  # app-local support library</code></pre>

<p>From the shell -</p>

<pre><code>  # Install LWP and its missing dependencies to the &#39;~/perl5&#39; directory
  perl -MCPAN -Mlocal::lib -e &#39;CPAN::install(LWP)&#39;

  # Just print out useful shell commands
  $ perl -Mlocal::lib
  PERL_MB_OPT=&#39;--install_base /home/username/perl5&#39;; export PERL_MB_OPT;
  PERL_MM_OPT=&#39;INSTALL_BASE=/home/username/perl5&#39;; export PERL_MM_OPT;
  PERL5LIB=&quot;/home/username/perl5/lib/perl5&quot;; export PERL5LIB;
  PATH=&quot;/home/username/perl5/bin:$PATH&quot;; export PATH;
  PERL_LOCAL_LIB_ROOT=&quot;/home/usename/perl5:$PERL_LOCAL_LIB_ROOT&quot;; export PERL_LOCAL_LIB_ROOT;</code></pre>

<p>From a <i>.bash_profile</i> or <i>.bashrc</i> file -</p>

<pre><code>  eval &quot;$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)&quot;</code></pre>

<h2 id="The-bootstrapping-technique"><a id="The"></a>The bootstrapping technique</h2>

<p>A typical way to install local::lib is using what is known as the &quot;bootstrapping&quot; technique. You would do this if your system administrator hasn&#39;t already installed local::lib. In this case, you&#39;ll need to install local::lib in your home directory.</p>

<p>Even if you do have administrative privileges, you will still want to set up your environment variables, as discussed in step 4. Without this, you would still install the modules into the system CPAN installation and also your Perl scripts will not use the lib/ path you bootstrapped with local::lib.</p>

<p>By default local::lib installs itself and the CPAN modules into ~/perl5.</p>

<p>Windows users must also see <a href="./local::lib.html#Differences-when-using-this-module-under-Win32">&quot;Differences when using this module under Win32&quot;</a>.</p>

<ol>

<li><p>Download and unpack the local::lib tarball from CPAN (search for &quot;Download&quot; on the CPAN page about local::lib). Do this as an ordinary user, not as root or administrator. Unpack the file in your home directory or in any other convenient location.</p>

</li>
<li><p>Run this:</p>

<pre><code>  perl Makefile.PL --bootstrap</code></pre>

<p>If the system asks you whether it should automatically configure as much as possible, you would typically answer yes.</p>

</li>
<li><p>Run this: (local::lib assumes you have make installed on your system)</p>

<pre><code>  make test &amp;&amp; make install</code></pre>

</li>
<li><p>Now we need to setup the appropriate environment variables, so that Perl starts using our newly generated lib/ directory. If you are using bash or any other Bourne shells, you can add this to your shell startup script this way:</p>

<pre><code>  echo &#39;eval &quot;$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)&quot;&#39; &gt;&gt;~/.bashrc</code></pre>

<p>If you are using C shell, you can do this as follows:</p>

<pre><code>  % echo $SHELL
  /bin/csh
  $ echo &#39;eval `perl -I$HOME/perl5/lib/perl5 -Mlocal::lib`&#39; &gt;&gt; ~/.cshrc</code></pre>

<p>After writing your shell configuration file, be sure to re-read it to get the changed settings into your current shell&#39;s environment. Bourne shells use <code>. ~/.bashrc</code> for this, whereas C shells use <code>source ~/.cshrc</code>.</p>

</li>
</ol>

<h3 id="Bootstrapping-into-an-alternate-directory"><a id="Bootstrapping"></a>Bootstrapping into an alternate directory</h3>

<p>In order to install local::lib into a directory other than the default, you need to specify the name of the directory when you call bootstrap. Then, when setting up the environment variables, both perl and local::lib must be told the location of the bootstrap directory. The setup process would look as follows:</p>

<pre><code>  perl Makefile.PL --bootstrap=~/foo
  make test &amp;&amp; make install
  echo &#39;eval &quot;$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)&quot;&#39; &gt;&gt;~/.bashrc
  . ~/.bashrc</code></pre>

<h3 id="Other-bootstrapping-options"><a id="Other"></a>Other bootstrapping options</h3>

<p>If you&#39;re on a slower machine, or are operating under draconian disk space limitations, you can disable the automatic generation of manpages from POD when installing modules by using the <code>--no-manpages</code> argument when bootstrapping:</p>

<pre><code>  perl Makefile.PL --bootstrap --no-manpages</code></pre>

<p>To avoid doing several bootstrap for several Perl module environments on the same account, for example if you use it for several different deployed applications independently, you can use one bootstrapped local::lib installation to install modules in different directories directly this way:</p>

<pre><code>  cd ~/mydir1
  perl -Mlocal::lib=./
  eval $(perl -Mlocal::lib=./)  ### To set the environment for this shell alone
  printenv                      ### You will see that ~/mydir1 is in the PERL5LIB
  perl -MCPAN -e install ...    ### whatever modules you want
  cd ../mydir2
  ... REPEAT ...</code></pre>

<p>If you use <i>.bashrc</i> to activate a local::lib automatically, the local::lib will be re-enabled in any sub-shells used, overriding adjustments you may have made in the parent shell. To avoid this, you can initialize the local::lib in <i>.bash_profile</i> rather than <i>.bashrc</i>, or protect the local::lib invocation with a <code>$SHLVL</code> check:</p>

<pre><code>  [ $SHLVL -eq 1 ] &amp;&amp; eval &quot;$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)&quot;</code></pre>

<p>If you are working with several <code>local::lib</code> environments, you may want to remove some of them from the current environment without disturbing the others. You can deactivate one environment like this (using bourne sh):</p>

<pre><code>  eval $(perl -Mlocal::lib=--deactivate,~/path)</code></pre>

<p>which will generate and run the commands needed to remove <code>~/path</code> from your various search paths. Whichever environment was <b>activated most recently</b> will remain the target for module installations. That is, if you activate <code>~/path_A</code> and then you activate <code>~/path_B</code>, new modules you install will go in <code>~/path_B</code>. If you deactivate <code>~/path_B</code> then modules will be installed into <code>~/pathA</code> -- but if you deactivate <code>~/path_A</code> then they will still be installed in <code>~/pathB</code> because pathB was activated later.</p>

<p>You can also ask <code>local::lib</code> to clean itself completely out of the current shell&#39;s environment with the <code>--deactivate-all</code> option. For multiple environments for multiple apps you may need to include a modified version of the <code>use FindBin</code> instructions in the &quot;In code&quot; sample above. If you did something like the above, you have a set of Perl modules at <code>~/mydir1/lib</code>. If you have a script at <code>~/mydir1/scripts/myscript.pl</code>, you need to tell it where to find the modules you installed for it at <code>~/mydir1/lib</code>.</p>

<p>In <code>~/mydir1/scripts/myscript.pl</code>:</p>

<pre><code>  use strict;
  use warnings;
  use local::lib &quot;$FindBin::Bin/..&quot;;  ### points to ~/mydir1 and local::lib finds lib
  use lib &quot;$FindBin::Bin/../lib&quot;;     ### points to ~/mydir1/lib</code></pre>

<p>Put this before any BEGIN { ... } blocks that require the modules you installed.</p>

<h2 id="Differences-when-using-this-module-under-Win32"><a id="Differences"></a>Differences when using this module under Win32</h2>

<p>To set up the proper environment variables for your current session of <code>CMD.exe</code>, you can use this:</p>

<pre><code>  C:\&gt;perl -Mlocal::lib
  set PERL_MB_OPT=--install_base C:\DOCUME~1\ADMINI~1\perl5
  set PERL_MM_OPT=INSTALL_BASE=C:\DOCUME~1\ADMINI~1\perl5
  set PERL5LIB=C:\DOCUME~1\ADMINI~1\perl5\lib\perl5
  set PATH=C:\DOCUME~1\ADMINI~1\perl5\bin;%PATH%

  ### To set the environment for this shell alone
  C:\&gt;perl -Mlocal::lib &gt; %TEMP%\tmp.bat &amp;&amp; %TEMP%\tmp.bat &amp;&amp; del %TEMP%\tmp.bat
  ### instead of $(perl -Mlocal::lib=./)</code></pre>

<p>If you want the environment entries to persist, you&#39;ll need to add them to the Control Panel&#39;s System applet yourself or use <a href="https://metacpan.org/pod/App::local::lib::Win32Helper">App::local::lib::Win32Helper</a>.</p>

<p>The &quot;~&quot; is translated to the user&#39;s profile directory (the directory named for the user under &quot;Documents and Settings&quot; (Windows XP or earlier) or &quot;Users&quot; (Windows Vista or later)) unless $ENV{HOME} exists. After that, the home directory is translated to a short name (which means the directory must exist) and the subdirectories are created.</p>

<h3 id="PowerShell">PowerShell</h3>

<p>local::lib also supports PowerShell, and can be used with the <code>Invoke-Expression</code> cmdlet.</p>

<pre><code>  Invoke-Expression &quot;$(perl -Mlocal::lib)&quot;</code></pre>

<h1 id="RATIONALE">RATIONALE</h1>

<p>The version of a Perl package on your machine is not always the version you need. Obviously, the best thing to do would be to update to the version you need. However, you might be in a situation where you&#39;re prevented from doing this. Perhaps you don&#39;t have system administrator privileges; or perhaps you are using a package management system such as Debian, and nobody has yet gotten around to packaging up the version you need.</p>

<p>local::lib solves this problem by allowing you to create your own directory of Perl packages downloaded from CPAN (in a multi-user system, this would typically be within your own home directory). The existing system Perl installation is not affected; you simply invoke Perl with special options so that Perl uses the packages in your own local package directory rather than the system packages. local::lib arranges things so that your locally installed version of the Perl packages takes precedence over the system installation.</p>

<p>If you are using a package management system (such as Debian), you don&#39;t need to worry about Debian and CPAN stepping on each other&#39;s toes. Your local version of the packages will be written to an entirely separate directory from those installed by Debian.</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>This module provides a quick, convenient way of bootstrapping a user-local Perl module library located within the user&#39;s home directory. It also constructs and prints out for the user the list of environment variables using the syntax appropriate for the user&#39;s current shell (as specified by the <code>SHELL</code> environment variable), suitable for directly adding to one&#39;s shell configuration file.</p>

<p>More generally, local::lib allows for the bootstrapping and usage of a directory containing Perl modules outside of Perl&#39;s <code>@INC</code>. This makes it easier to ship an application with an app-specific copy of a Perl module, or collection of modules. Useful in cases like when an upstream maintainer hasn&#39;t applied a patch to a module of theirs that you need for your application.</p>

<p>On import, local::lib sets the following environment variables to appropriate values:</p>

<dl>

<dt id="PERL_MB_OPT">PERL_MB_OPT</dt>
<dd>

</dd>
<dt id="PERL_MM_OPT">PERL_MM_OPT</dt>
<dd>

</dd>
<dt id="PERL5LIB">PERL5LIB</dt>
<dd>

</dd>
<dt id="PATH">PATH</dt>
<dd>

</dd>
<dt id="PERL_LOCAL_LIB_ROOT">PERL_LOCAL_LIB_ROOT</dt>
<dd>

</dd>
</dl>

<p>When possible, these will be appended to instead of overwritten entirely.</p>

<p>These values are then available for reference by any code after import.</p>

<h1 id="CREATING-A-SELF-CONTAINED-SET-OF-MODULES"><a id="CREATING"></a>CREATING A SELF-CONTAINED SET OF MODULES</h1>

<p>See <a href="https://metacpan.org/pod/lib::core::only">lib::core::only</a> for one way to do this - but note that there are a number of caveats, and the best approach is always to perform a build against a clean perl (i.e. site and vendor as close to empty as possible).</p>

<h1 id="IMPORT-OPTIONS"><a id="IMPORT"></a>IMPORT OPTIONS</h1>

<p>Options are values that can be passed to the <code>local::lib</code> import besides the directory to use. They are specified as <code>use local::lib &#39;--option&#39;[, path];</code> or <code>perl -Mlocal::lib=--option[,path]</code>.</p>

<h2 id="-deactivate"><a id="deactivate"></a>--deactivate</h2>

<p>Remove the chosen path (or the default path) from the module search paths if it was added by <code>local::lib</code>, instead of adding it.</p>

<h2 id="-deactivate-all"><a id="deactivate-all"></a>--deactivate-all</h2>

<p>Remove all directories that were added to search paths by <code>local::lib</code> from the search paths.</p>

<h2 id="-quiet"><a id="quiet"></a>--quiet</h2>

<p>Don&#39;t output any messages about directories being created.</p>

<h2 id="-always"><a id="always"></a>--always</h2>

<p>Always add directories to environment variables, ignoring if they are already included.</p>

<h2 id="-shelltype"><a id="shelltype"></a>--shelltype</h2>

<p>Specify the shell type to use for output. By default, the shell will be detected based on the environment. Should be one of: <code>bourne</code>, <code>csh</code>, <code>cmd</code>, or <code>powershell</code>.</p>

<h2 id="-no-create"><a id="no-create"></a>--no-create</h2>

<p>Prevents <code>local::lib</code> from creating directories when activating dirs. This is likely to cause issues on Win32 systems.</p>

<h1 id="CLASS-METHODS"><a id="CLASS"></a>CLASS METHODS</h1>

<h2 id="ensure_dir_structure_for">ensure_dir_structure_for</h2>

<dl>

<dt id="Arguments:-$path"><a id="Arguments"></a><a id="Arguments:--path"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-None"><a id="Return"></a>Return value: None</dt>
<dd>

</dd>
</dl>

<p>Attempts to create a local::lib directory, including subdirectories and all required parent directories. Throws an exception on failure.</p>

<h2 id="print_environment_vars_for">print_environment_vars_for</h2>

<dl>

<dt id="Arguments:-$path1"><a id="Arguments1"></a><a id="Arguments:--path1"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-None1"><a id="Return1"></a>Return value: None</dt>
<dd>

</dd>
</dl>

<p>Prints to standard output the variables listed above, properly set to use the given path as the base directory.</p>

<h2 id="build_environment_vars_for">build_environment_vars_for</h2>

<dl>

<dt id="Arguments:-$path2"><a id="Arguments2"></a><a id="Arguments:--path2"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-%environment_vars"><a id="Return2"></a><a id="Return-value:--environment_vars"></a>Return value: %environment_vars</dt>
<dd>

</dd>
</dl>

<p>Returns a hash with the variables listed above, properly set to use the given path as the base directory.</p>

<h2 id="setup_env_hash_for">setup_env_hash_for</h2>

<dl>

<dt id="Arguments:-$path3"><a id="Arguments3"></a><a id="Arguments:--path3"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-None2"><a id="Return3"></a>Return value: None</dt>
<dd>

</dd>
</dl>

<p>Constructs the <code>%ENV</code> keys for the given path, by calling <a href="./local::lib.html#build_environment_vars_for">&quot;build_environment_vars_for&quot;</a>.</p>

<h2 id="active_paths">active_paths</h2>

<dl>

<dt id="Arguments:-None"><a id="Arguments4"></a>Arguments: None</dt>
<dd>

</dd>
<dt id="Return-value:-@paths"><a id="Return4"></a><a id="Return-value:--paths"></a>Return value: @paths</dt>
<dd>

</dd>
</dl>

<p>Returns a list of active <code>local::lib</code> paths, according to the <code>PERL_LOCAL_LIB_ROOT</code> environment variable and verified against what is really in <code>@INC</code>.</p>

<h2 id="install_base_perl_path">install_base_perl_path</h2>

<dl>

<dt id="Arguments:-$path4"><a id="Arguments5"></a><a id="Arguments:--path4"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$install_base_perl_path"><a id="Return5"></a><a id="Return-value:--install_base_perl_path"></a>Return value: $install_base_perl_path</dt>
<dd>

</dd>
</dl>

<p>Returns a path describing where to install the Perl modules for this local library installation. Appends the directories <code>lib</code> and <code>perl5</code> to the given path.</p>

<h2 id="lib_paths_for">lib_paths_for</h2>

<dl>

<dt id="Arguments:-$path5"><a id="Arguments6"></a><a id="Arguments:--path5"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-@lib_paths"><a id="Return6"></a><a id="Return-value:--lib_paths"></a>Return value: @lib_paths</dt>
<dd>

</dd>
</dl>

<p>Returns the list of paths perl will search for libraries, given a base path. This includes the base path itself, the architecture specific subdirectory, and perl version specific subdirectories. These paths may not all exist.</p>

<h2 id="install_base_bin_path">install_base_bin_path</h2>

<dl>

<dt id="Arguments:-$path6"><a id="Arguments7"></a><a id="Arguments:--path6"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$install_base_bin_path"><a id="Return7"></a><a id="Return-value:--install_base_bin_path"></a>Return value: $install_base_bin_path</dt>
<dd>

</dd>
</dl>

<p>Returns a path describing where to install the executable programs for this local library installation. Appends the directory <code>bin</code> to the given path.</p>

<h2 id="installer_options_for">installer_options_for</h2>

<dl>

<dt id="Arguments:-$path7"><a id="Arguments8"></a><a id="Arguments:--path7"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-%installer_env_vars"><a id="Return8"></a><a id="Return-value:--installer_env_vars"></a>Return value: %installer_env_vars</dt>
<dd>

</dd>
</dl>

<p>Returns a hash of environment variables that should be set to cause installation into the given path.</p>

<h2 id="resolve_empty_path">resolve_empty_path</h2>

<dl>

<dt id="Arguments:-$path8"><a id="Arguments9"></a><a id="Arguments:--path8"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$base_path"><a id="Return9"></a><a id="Return-value:--base_path"></a>Return value: $base_path</dt>
<dd>

</dd>
</dl>

<p>Builds and returns the base path into which to set up the local module installation. Defaults to <code>~/perl5</code>.</p>

<h2 id="resolve_home_path">resolve_home_path</h2>

<dl>

<dt id="Arguments:-$path9"><a id="Arguments10"></a><a id="Arguments:--path9"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$home_path"><a id="Return10"></a><a id="Return-value:--home_path"></a>Return value: $home_path</dt>
<dd>

</dd>
</dl>

<p>Attempts to find the user&#39;s home directory. If no definite answer is available, throws an exception.</p>

<h2 id="resolve_relative_path">resolve_relative_path</h2>

<dl>

<dt id="Arguments:-$path10"><a id="Arguments11"></a><a id="Arguments:--path10"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$absolute_path"><a id="Return11"></a><a id="Return-value:--absolute_path"></a>Return value: $absolute_path</dt>
<dd>

</dd>
</dl>

<p>Translates the given path into an absolute path.</p>

<h2 id="resolve_path">resolve_path</h2>

<dl>

<dt id="Arguments:-$path11"><a id="Arguments12"></a><a id="Arguments:--path11"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$absolute_path1"><a id="Return12"></a><a id="Return-value:--absolute_path1"></a>Return value: $absolute_path</dt>
<dd>

</dd>
</dl>

<p>Calls the following in a pipeline, passing the result from the previous to the next, in an attempt to find where to configure the environment for a local library installation: <a href="./local::lib.html#resolve_empty_path">&quot;resolve_empty_path&quot;</a>, <a href="./local::lib.html#resolve_home_path">&quot;resolve_home_path&quot;</a>, <a href="./local::lib.html#resolve_relative_path">&quot;resolve_relative_path&quot;</a>. Passes the given path argument to <a href="./local::lib.html#resolve_empty_path">&quot;resolve_empty_path&quot;</a> which then returns a result that is passed to <a href="./local::lib.html#resolve_home_path">&quot;resolve_home_path&quot;</a>, which then has its result passed to <a href="./local::lib.html#resolve_relative_path">&quot;resolve_relative_path&quot;</a>. The result of this final call is returned from <a href="./local::lib.html#resolve_path">&quot;resolve_path&quot;</a>.</p>

<h1 id="OBJECT-INTERFACE"><a id="OBJECT"></a>OBJECT INTERFACE</h1>

<h2 id="new">new</h2>

<dl>

<dt id="Arguments:-%attributes"><a id="Arguments13"></a><a id="Arguments:--attributes"></a>Arguments: %attributes</dt>
<dd>

</dd>
<dt id="Return-value:-$local_lib"><a id="Return13"></a><a id="Return-value:--local_lib"></a>Return value: $local_lib</dt>
<dd>

</dd>
</dl>

<p>Constructs a new <code>local::lib</code> object, representing the current state of <code>@INC</code> and the relevant environment variables.</p>

<h1 id="ATTRIBUTES">ATTRIBUTES</h1>

<h2 id="roots">roots</h2>

<p>An arrayref representing active <code>local::lib</code> directories.</p>

<h2 id="inc">inc</h2>

<p>An arrayref representing <code>@INC</code>.</p>

<h2 id="libs">libs</h2>

<p>An arrayref representing the PERL5LIB environment variable.</p>

<h2 id="bins">bins</h2>

<p>An arrayref representing the PATH environment variable.</p>

<h2 id="extra">extra</h2>

<p>A hashref of extra environment variables (e.g. <code>PERL_MM_OPT</code> and <code>PERL_MB_OPT</code>)</p>

<h2 id="no_create">no_create</h2>

<p>If set, <code>local::lib</code> will not try to create directories when activating them.</p>

<h1 id="OBJECT-METHODS"><a id="OBJECT1"></a>OBJECT METHODS</h1>

<h2 id="clone">clone</h2>

<dl>

<dt id="Arguments:-%attributes1"><a id="Arguments14"></a><a id="Arguments:--attributes1"></a>Arguments: %attributes</dt>
<dd>

</dd>
<dt id="Return-value:-$local_lib1"><a id="Return14"></a><a id="Return-value:--local_lib1"></a>Return value: $local_lib</dt>
<dd>

</dd>
</dl>

<p>Constructs a new <code>local::lib</code> object based on the existing one, overriding the specified attributes.</p>

<h2 id="activate">activate</h2>

<dl>

<dt id="Arguments:-$path12"><a id="Arguments15"></a><a id="Arguments:--path12"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$new_local_lib"><a id="Return15"></a><a id="Return-value:--new_local_lib"></a>Return value: $new_local_lib</dt>
<dd>

</dd>
</dl>

<p>Constructs a new instance with the specified path active.</p>

<h2 id="deactivate1">deactivate</h2>

<dl>

<dt id="Arguments:-$path13"><a id="Arguments16"></a><a id="Arguments:--path13"></a>Arguments: $path</dt>
<dd>

</dd>
<dt id="Return-value:-$new_local_lib1"><a id="Return16"></a><a id="Return-value:--new_local_lib1"></a>Return value: $new_local_lib</dt>
<dd>

</dd>
</dl>

<p>Constructs a new instance with the specified path deactivated.</p>

<h2 id="deactivate_all">deactivate_all</h2>

<dl>

<dt id="Arguments:-None1"><a id="Arguments17"></a>Arguments: None</dt>
<dd>

</dd>
<dt id="Return-value:-$new_local_lib2"><a id="Return17"></a><a id="Return-value:--new_local_lib2"></a>Return value: $new_local_lib</dt>
<dd>

</dd>
</dl>

<p>Constructs a new instance with all <code>local::lib</code> directories deactivated.</p>

<h2 id="environment_vars_string">environment_vars_string</h2>

<dl>

<dt id="Arguments:-[-$shelltype-]"><a id="Arguments18"></a><a id="Arguments:----shelltype"></a>Arguments: [ $shelltype ]</dt>
<dd>

</dd>
<dt id="Return-value:-$shell_env_string"><a id="Return18"></a><a id="Return-value:--shell_env_string"></a>Return value: $shell_env_string</dt>
<dd>

</dd>
</dl>

<p>Returns a string to set up the <code>local::lib</code>, meant to be run by a shell.</p>

<h2 id="build_environment_vars">build_environment_vars</h2>

<dl>

<dt id="Arguments:-None2"><a id="Arguments19"></a>Arguments: None</dt>
<dd>

</dd>
<dt id="Return-value:-%environment_vars1"><a id="Return19"></a><a id="Return-value:--environment_vars1"></a>Return value: %environment_vars</dt>
<dd>

</dd>
</dl>

<p>Returns a hash with the variables listed above, properly set to use the given path as the base directory.</p>

<h2 id="setup_env_hash">setup_env_hash</h2>

<dl>

<dt id="Arguments:-None3"><a id="Arguments20"></a>Arguments: None</dt>
<dd>

</dd>
<dt id="Return-value:-None3"><a id="Return20"></a>Return value: None</dt>
<dd>

</dd>
</dl>

<p>Constructs the <code>%ENV</code> keys for the given path, by calling <a href="./local::lib.html#build_environment_vars">&quot;build_environment_vars&quot;</a>.</p>

<h2 id="setup_local_lib">setup_local_lib</h2>

<p>Constructs the <code>%ENV</code> hash using <a href="./local::lib.html#setup_env_hash">&quot;setup_env_hash&quot;</a>, and set up <code>@INC</code>.</p>

<h1 id="A-WARNING-ABOUT-UNINST=1"><a id="A"></a><a id="A-WARNING-ABOUT-UNINST-1"></a>A WARNING ABOUT UNINST=1</h1>

<p>Be careful about using local::lib in combination with &quot;make install UNINST=1&quot;. The idea of this feature is that will uninstall an old version of a module before installing a new one. However it lacks a safety check that the old version and the new version will go in the same directory. Used in combination with local::lib, you can potentially delete a globally accessible version of a module while installing the new version in a local place. Only combine &quot;make install UNINST=1&quot; and local::lib if you understand these possible consequences.</p>

<h1 id="LIMITATIONS">LIMITATIONS</h1>

<ul>

<li><p>Directory names with spaces in them are not well supported by the perl toolchain and the programs it uses. Pure-perl distributions should support spaces, but problems are more likely with dists that require compilation. A workaround you can do is moving your local::lib to a directory with spaces <b>after</b> you installed all modules inside your local::lib bootstrap. But be aware that you can&#39;t update or install CPAN modules after the move.</p>

</li>
<li><p>Rather basic shell detection. Right now anything with csh in its name is assumed to be a C shell or something compatible, and everything else is assumed to be Bourne, except on Win32 systems. If the <code>SHELL</code> environment variable is not set, a Bourne-compatible shell is assumed.</p>

</li>
<li><p>Kills any existing PERL_MM_OPT or PERL_MB_OPT.</p>

</li>
<li><p>Should probably auto-fixup CPAN config if not already done.</p>

</li>
<li><p>On VMS and MacOS Classic (pre-OS X), local::lib loads <a href="https://metacpan.org/pod/File::Spec">File::Spec</a>. This means any <a href="https://metacpan.org/pod/File::Spec">File::Spec</a> version installed in the local::lib will be ignored by scripts using local::lib. A workaround for this is using <code>use lib &quot;$local_lib/lib/perl5&quot;;</code> instead of using <code>local::lib</code> directly.</p>

</li>
<li><p>Conflicts with <a href="https://metacpan.org/pod/ExtUtils::MakeMaker">ExtUtils::MakeMaker</a>&#39;s <code>PREFIX</code> option. <code>local::lib</code> uses the <code>INSTALL_BASE</code> option, as it has more predictable and sane behavior. If something attempts to use the <code>PREFIX</code> option when running a <i>Makefile.PL</i>, <a href="https://metacpan.org/pod/ExtUtils::MakeMaker">ExtUtils::MakeMaker</a> will refuse to run, as the two options conflict. This can be worked around by temporarily unsetting the <code>PERL_MM_OPT</code> environment variable.</p>

</li>
<li><p>Conflicts with <a href="./Module::Build.html">Module::Build</a>&#39;s <code>--prefix</code> option. Similar to the previous limitation, but any <code>--prefix</code> option specified will be ignored. This can be worked around by temporarily unsetting the <code>PERL_MB_OPT</code> environment variable.</p>

</li>
</ul>

<p>Patches very much welcome for any of the above.</p>

<ul>

<li><p>On Win32 systems, does not have a way to write the created environment variables to the registry, so that they can persist through a reboot.</p>

</li>
</ul>

<h1 id="TROUBLESHOOTING">TROUBLESHOOTING</h1>

<p>If you&#39;ve configured local::lib to install CPAN modules somewhere in to your home directory, and at some point later you try to install a module with <code>cpan -i Foo::Bar</code>, but it fails with an error like: <code>Warning: You do not have permissions to install into /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux at /usr/lib64/perl5/5.8.8/Foo/Bar.pm</code> and buried within the install log is an error saying <code>&#39;INSTALL_BASE&#39; is not a known MakeMaker parameter name</code>, then you&#39;ve somehow lost your updated ExtUtils::MakeMaker module.</p>

<p>To remedy this situation, rerun the bootstrapping procedure documented above.</p>

<p>Then, run <code>rm -r ~/.cpan/build/Foo-Bar*</code></p>

<p>Finally, re-run <code>cpan -i Foo::Bar</code> and it should install without problems.</p>

<h1 id="ENVIRONMENT">ENVIRONMENT</h1>

<dl>

<dt id="SHELL">SHELL</dt>
<dd>

</dd>
<dt id="COMSPEC">COMSPEC</dt>
<dd>

<p>local::lib looks at the user&#39;s <code>SHELL</code> environment variable when printing out commands to add to the shell configuration file.</p>

<p>On Win32 systems, <code>COMSPEC</code> is also examined.</p>

</dd>
</dl>

<h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1>

<ul>

<li><p><a href="http://perladvent.org/2011/2011-12-01.html">Perl Advent article, 2011</a></p>

</li>
</ul>

<h1 id="SUPPORT">SUPPORT</h1>

<p>IRC:</p>

<pre><code>    Join #toolchain on irc.perl.org.</code></pre>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Matt S Trout &lt;mst@shadowcat.co.uk&gt; http://www.shadowcat.co.uk/</p>

<p>auto_install fixes kindly sponsored by http://www.takkle.com/</p>

<h1 id="CONTRIBUTORS">CONTRIBUTORS</h1>

<p>Patches to correctly output commands for csh style shells, as well as some documentation additions, contributed by Christopher Nehren &lt;apeiron@cpan.org&gt;.</p>

<p>Doc patches for a custom local::lib directory, more cleanups in the english documentation and a <a href="https://metacpan.org/pod/POD2::DE::local::lib">german documentation</a> contributed by Torsten Raudssus &lt;torsten@raudssus.de&gt;.</p>

<p>Hans Dieter Pearcey &lt;hdp@cpan.org&gt; sent in some additional tests for ensuring things will install properly, submitted a fix for the bug causing problems with writing Makefiles during bootstrapping, contributed an example program, and submitted yet another fix to ensure that local::lib can install and bootstrap properly. Many, many thanks!</p>

<p>pattern of Freenode IRC contributed the beginnings of the Troubleshooting section. Many thanks!</p>

<p>Patch to add Win32 support contributed by Curtis Jewell &lt;csjewell@cpan.org&gt;.</p>

<p>Warnings for missing PATH/PERL5LIB (as when not running interactively) silenced by a patch from Marco Emilio Poleggi.</p>

<p>Mark Stosberg &lt;mark@summersault.com&gt; provided the code for the now deleted &#39;--self-contained&#39; option.</p>

<p>Documentation patches to make win32 usage clearer by David Mertens &lt;dcmertens.perl@gmail.com&gt; (run4flat).</p>

<p>Brazilian <a href="https://metacpan.org/pod/POD2::PT_BR::local::lib">portuguese translation</a> and minor doc patches contributed by Breno G. de Oliveira &lt;garu@cpan.org&gt;.</p>

<p>Improvements to stacking multiple local::lib dirs and removing them from the environment later on contributed by Andrew Rodland &lt;arodland@cpan.org&gt;.</p>

<p>Patch for Carp version mismatch contributed by Hakim Cassimally &lt;osfameron@cpan.org&gt;.</p>

<p>Rewrite of internals and numerous bug fixes and added features contributed by Graham Knop &lt;haarg@haarg.org&gt;.</p>

<h1 id="COPYRIGHT">COPYRIGHT</h1>

<p>Copyright (c) 2007 - 2013 the local::lib <a href="./local::lib.html#AUTHOR">&quot;AUTHOR&quot;</a> and <a href="./local::lib.html#CONTRIBUTORS">&quot;CONTRIBUTORS&quot;</a> as listed above.</p>

<h1 id="LICENSE">LICENSE</h1>

<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install local::lib, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm local::lib</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install local::lib</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./local::lib.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
